from django.apps import AppConfig


class TimetaskerConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'timetasker'
    print("-----任务启动-------")

    def ready(self):
        from .scheduler import scheduler, cron_task

        scheduler.start()
        cron_task()
